<%@page contentType="text/html" %>
<%@page contentType="text/html" %>
<%@page pageEncoding="UTF-8" %>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Goodwill - Прейскурант</title>
    <link rel="stylesheet" href="resources/css/main.css"/>
    <link rel="stylesheet" href="resources/css/stylesheet.css"/>
</head>
<body>
<f:view>

<jsp:include page="menu.jsp"/>
<jsp:include page="status.jsp"/>

<h:form>
<!-- Паджинатор -->
<h:panelGroup id="pager">
    <h:outputText value="Страница: " styleClass="b"/>

    <a4j:commandLink ajaxSingle="true" action="#{PricelistsPlainOld.toBegin}" value="|<<" reRender="tblPricelist,pager" styleClass="pager_arr"/>
    <a4j:commandLink ajaxSingle="true" action="#{PricelistsPlainOld.longPrevPage}" value="<<" reRender="tblPricelist,pager" styleClass="pager_arr"/>
    <a4j:commandLink ajaxSingle="true" action="#{PricelistsPlainOld.prevPage}" value="<" reRender="tblPricelist,pager" styleClass="pager_arr"/>

    <h:panelGroup id="pager_nums">
        <a4j:repeat value="#{PricelistsPlainOld.pageIndexes}" var="pageIndex">
            <a4j:commandLink action="#{PricelistsPlainOld.applyPage}" ajaxSingle="true" value="#{pageIndex.num}" rendered="#{pageIndex.selected}" styleClass="pager_page_active" reRender="tblPricelist,pager">
                <a4j:actionparam name="page_id" assignTo="#{PricelistsPlainOld.page}" value="#{pageIndex.num}"/>
            </a4j:commandLink>
            <a4j:commandLink action="#{PricelistsPlainOld.applyPage}" ajaxSingle="true" value="#{pageIndex.num}" rendered="#{!pageIndex.selected}" styleClass="pager_page" reRender="tblPricelist,pager">
                <a4j:actionparam name="page_id" assignTo="#{PricelistsPlainOld.page}" value="#{pageIndex.num}"/>
            </a4j:commandLink>
        </a4j:repeat>
    </h:panelGroup>

    <a4j:commandLink ajaxSingle="true" action="#{PricelistsPlainOld.nextPage}" value=">" reRender="tblPricelist,pager" styleClass="pager_arr"/>
    <a4j:commandLink ajaxSingle="true" action="#{PricelistsPlainOld.longNextPage}" value=">>" reRender="tblPricelist,pager" styleClass="pager_arr"/>
    <a4j:commandLink ajaxSingle="true" action="#{PricelistsPlainOld.toEnd}" value=">>|" reRender="tblPricelist,pager" styleClass="pager_arr"/>

    <h:outputText value="(всего: #{PricelistsPlainOld.pagesCount})"/>
</h:panelGroup>
<!-- ---------- -->

<rich:spacer width="10"/>

<!-- Фильтр -->
<h:panelGroup id="filter" style="white-space:nowrap;">
    <h:outputText value="Фильтр: " styleClass="b"/>
    <h:outputText value="Код"/>
    <h:inputText value="#{SessionBean._pricelistFilter.code}" styleClass="f_tb_s"/>
    <h:outputText value="Наименование"/>
    <h:inputText value="#{SessionBean._pricelistFilter.name}" styleClass="f_tb_l"/>
    <h:outputText value="Группа товара"/>
    <h:selectOneMenu value="#{SessionBean._pricelistFilter.goodTypeId}" styleClass="f_s">
        <f:selectItems value="#{GoodTypesBean.goodTypesAsSelectItems}"/>
    </h:selectOneMenu>
    <a4j:commandButton reRender="pager,tblPricelist2" value="Применить" action="#{PricelistsPlainOld.applyFilter}"/>
</h:panelGroup>
<!-- ------ -->

<rich:spacer width="10"/>

<!-- -->
<h:panelGroup id="actions" style="white-space:nowrap;background-color:whitesmoke;padding-bottom:2px;padding-top:1px" styleClass="" layout="block" rendered="#{SecurityBean.isRoleAdministrator}">
    <h:outputText value="Действия: " styleClass="b"/>

    <a4j:commandLink action="#{PricelistsPlainOld.commit}" reRender="tblPricelist" id="bSavePricelist">
        <h:graphicImage value="/resources/img/save_16x16.png"/>
        <h:outputText value="Сохранить" styleClass="b"/>
    </a4j:commandLink>
    <rich:toolTip for="bSavePricelist">
        Сохранить <b>текущую страницу</b> прайслиста
    </rich:toolTip>

    <h:panelGroup style="border:1px solid dimgray;padding:2px">
        <h:graphicImage value="/resources/img/office/excel.png" width="16"/>

        <rich:spacer width="5"/>
        <a4j:commandLink id="aImportFromExcel" onclick="document.location='ImportPricelist.jsf';return false;" reRender="dvDownloadExcelFile">
            <h:outputText value="Загрузить из Excel"/>
        </a4j:commandLink>
        <rich:toolTip for="aImportFromExcel">
            <h:panelGrid columns="2" cellpadding="0" cellspacing="0" columnClasses="top,top">
                <h:graphicImage value="/resources/img/office/excel.png" width="32"/>
                <h:outputText value="Позволяет загрузить прейскурант в <b>ИНТЕРНЕТ-систему</b> из файла <b>Microsoft Excel</b>" escape="false"/>
            </h:panelGrid>
        </rich:toolTip>

        <rich:spacer width="5"/>
        <a4j:commandLink id="aExportToExcel" action="#{PricelistsPlainOld.prepareExcelFile}" reRender="dvDownloadExcelFile">
            <h:outputText value="Выгрузить в Excel"/>
        </a4j:commandLink>
        <rich:toolTip for="aExportToExcel">
            <h:panelGrid columns="2" cellpadding="0" cellspacing="0" columnClasses="top,top">
                <h:graphicImage value="/resources/img/office/excel.png" width="32"/>
                <h:outputText value="Позволяет выгрузить прейскурант из <b>ИНТЕРНЕТ-системы</b> в виде файла <b>Microsoft Excel</b>" escape="false"/>
            </h:panelGrid>
        </rich:toolTip>
        <h:panelGroup id="dvDownloadExcelFile">
            <h:outputLink value="#{PricelistsPlainOld.downloadExcelFileLink}" rendered="#{not empty PricelistsPlainOld.downloadExcelFileLink}">
                <h:outputText value="[скачать]" style="color:red;font-weight:bold;"/>
            </h:outputLink>
        </h:panelGroup>
    </h:panelGroup>
</h:panelGroup>
<!-- ------ -->

<jsp:include page="messages.jsp"/>

<!-- ------ -->
<a4j:outputPanel ajaxRendered="true" id="tblPricelist2">
<rich:dataTable value="#{PricelistsPlainOld.pageItems}" var="item" cellpadding="0" cellspacing="0"
                columnClasses="pp_h0,pp_h1,pp_h2,pp_h3,pp_h4,pp_h5,pp_h6,pp_c0,pp_c1,pp_c2,pp_c3,pp_c4,pp_c5,pp_c6,pp_c7,pp_c8,pp_c9"
                id="tblPricelist">

<f:facet name="header">
<rich:columnGroup>
<rich:column>
    <h:outputText value="Код"/>
</rich:column>
<rich:column>
    <h:outputText value="Наименование"/>
</rich:column>
<rich:column>
    <h:outputText value="Группа товара"/>
</rich:column>
<%--<rich:column>--%>
    <%--<h:outputText value="M&H"/>--%>
<%--</rich:column>--%>
<rich:column>
    <h:outputText value="о.е."/>
</rich:column>
<rich:column>
    <h:outputText value="Применимость"/>
</rich:column>
<rich:column>
    <h:outputText value="ТД"/>
</rich:column>

<!-- Ну очень тупой код дальше -->
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[0])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[0].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[1])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[1].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[2])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[2].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[3])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[3].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<!-- Как же тупо.. А все потому, что я не знаю как подключить компоненты ui:repeat и c:foreach -->
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[4])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[4].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[5])}">    
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[5].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[6])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[6].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[7])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[7].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[8])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[8].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[9])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[9].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[10])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[10].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[11])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[11].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[12])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[12].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[13])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[13].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>

<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[14])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[14].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[15])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[15].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[16])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[16].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
 <rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[17])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[17].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[18])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[18].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[19])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[19].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[20])}">
    <h:panelGroup>
        <h:panelGroup>
            <h:outputText value="#{PricelistsPlainOld.clientGroups[20].longName}" styleClass="pp_captions_active"/>
        </h:panelGroup>
    </h:panelGroup>
</rich:column>
<!-- ------------------------- -->
</rich:columnGroup>
</f:facet>

<rich:column>
    <h:outputText value="#{item.good.code}"/>
</rich:column>
<rich:column>

    <!-- Редактирование товара -->
    <a4j:commandLink ajaxSingle="true"
                     action="#"
                     oncomplete="document.location.href='GoodsPage.jsf'">
        <a4j:actionparam name="good_code" assignTo="#{SessionBean.goodsFilter.code}" value="#{item.good.code}"/>
        <a4j:actionparam name="good_type_id" assignTo="#{SessionBean.goodsFilter.goodTypeId}" value="#{-1}"/>
        <a4j:actionparam name="good_name" assignTo="#{SessionBean.goodsFilter.name}" value=""/>
        <h:outputText value="#{item.good.name}" id="lGoodName"/>
    </a4j:commandLink>

    <rich:toolTip for="lGoodName">
        <h:panelGrid columns="2" cellpadding="0" cellspacing="0" columnClasses="lsummary,rsummary" styleClass="summary">
            <h:outputText value="Код" style="color:darkred;"/>
            <h:outputText value="#{item.good.code}" style="color:darkred;"/>
            <h:outputText value="Группа товаров"/>
            <h:outputText value="#{item.good.goodType.name}"/>
            <h:outputText value="Наименование"/>
            <h:outputText value="#{item.good.name}"/>
            <h:outputText value="Вес"/>
            <h:outputText value="#{item.good.weight} кг"/>
            <h:outputText value="Объем"/>
            <h:outputText value="#{item.good.volume} м3"/>
            <h:outputText value="В упаковке"/>
            <h:outputText value="#{item.good.packageCount} шт"/>
        </h:panelGrid>
    </rich:toolTip>
</rich:column>


<rich:column>
    <h:outputText value="#{item.good.goodType.name}"/>
</rich:column>
<rich:column>
    <h:outputText value="#{item.good.oeShort}" id="lOeShort"/>
</rich:column>
<rich:column>
    <h:outputText value="#{item.good.pr}"/>
</rich:column>
<rich:column>
    <h:outputText value="#{item.good.minPrice} р." style="white-space:nowrap;"/>
</rich:column>

<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[0])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[0].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[0].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[1])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[1].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[1].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[2])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[2].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[2].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[3])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[3].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[3].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[4])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[4].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[4].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[5])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[5].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[5].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[6])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[6].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[6].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[7])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[7].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[7].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[8])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[8].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[8].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[9])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[9].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[9].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[10])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[10].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[10].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[11])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[11].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[11].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[12])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[12].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[12].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[13])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[13].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[13].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[14])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[14].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[14].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[15])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[15].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[15].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[16])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[16].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[16].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[17])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[17].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[17].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[18])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[18].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[18].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[19])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[19].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[19].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>
<rich:column rendered="#{!empty(PricelistsPlainOld.clientGroups[20])}">
    <h:inputText value="#{item.prices[PricelistsPlainOld.clientGroups[20].id].value}" styleClass="pp_i"
                 converterMessage="В ячейках прайлиста допускаются только числа"
                 rendered="#{SecurityBean.isRoleAdministrator}"/>
    <h:outputText value="#{item.prices[PricelistsPlainOld.clientGroups[20].id].value}"
                  rendered="#{SecurityBean.isRoleManager}"/>
</rich:column>

</rich:dataTable>
</a4j:outputPanel>
</h:form>

<jsp:include page="oes.jsp"/>
</f:view>
</body>
</html>
